const koaRouter = require('@koa/router')
const { create, remove, update, get, getList } = require('../controller/enterpriseController.js')
const { verifAuth } = require('../middleware/login.middleware.js')

const enterpriseRouter = new koaRouter({ prefix: '/enterprise' })
// 增加
enterpriseRouter.post('/', verifAuth, create)
// // 查
enterpriseRouter.get('/:id', get)
enterpriseRouter.get('/', getList)
// // 改
enterpriseRouter.post('/:id', verifAuth, update)
// // 删
enterpriseRouter.delete('/:id', verifAuth, remove)
module.exports = enterpriseRouter
